package com.bytezero.inherit3;

public class Cylinder extends Circle
{

	private double length;
	
	public Cylinder()
	{
		super();
		double length = 1.0;
	}
	
	public void setLength(double length)
	{
		this.length  = length;
	}
	
	
	public double getLength()
	{
		return length;
	}
	
	public double findVolume()
	{
		//return Math.PI * getRadius() * getRadius() *length;
		//return Math.PI * getRadius() * getRadius() *getLength();
	    return super.findArea() * getLength();
		
	}
	
	@Override
	//返回圆柱的表面积
	public double findArea()
	{
		return Math.PI *getRadius() *getRadius() *2+
				2*Math.PI *getRadius()*getLength();
	}
	
	
	
	
}



























































